package com.martini.model;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author whxiang at 2021/8/30 23:52
 */
@Data
@Accessors(chain = true)
public class R {

    private Integer code;
    private String msg;
    private Object data;

    public static R success() {
        return new R().setCode(200).setMsg("ok");
    }

    public static R fail() {
        return new R().setCode(500).setMsg("fail");
    }

}
